package scrolls;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;

public class HUD
{

	static void drawHUD(Graphics2D g2d)
	{
		int energy = Player.playerEnergy();
		int mana = Player.playerMana();
		int health = Player.playerHealth();
		int exp = Player.playerExp();
		int lvl = Player.playerLvl();
		int expNeeded = Player.getNextExp();

		g2d.setColor(Color.decode("0x815713"));
		g2d.fillRect(0, 448, 800, 152);

		g2d.setFont(Resources.f);
		g2d.setColor(Color.RED);
		g2d.drawString("Health", 35, 480);
		g2d.fillRect(130, 465, health, 18);
		g2d.setColor(Color.BLACK);
		g2d.setFont(Resources.fs);
		g2d.drawString(Integer.toString(health), 140, 480);
		g2d.drawRect(130, 465, 100, 18);

		g2d.setFont(Resources.f);
		g2d.setColor(Color.decode("0x3399FF"));
		g2d.drawString("Mana", 35, 505);
		g2d.fillRect(130, 490, mana, 18);
		g2d.setColor(Color.BLACK);
		g2d.setFont(Resources.fs);
		g2d.drawString(Integer.toString(mana), 140, 505);
		g2d.drawRect(130, 490, 100, 18);

		g2d.setColor(Color.decode("0xFFFF66"));
		g2d.drawString("Energy", 35, 530);
		g2d.fillRect(130, 515, energy / 1500, 18);
		g2d.setColor(Color.BLACK);
		g2d.setFont(Resources.fs);
		g2d.drawString(Integer.toString(energy / 1500), 140, 530);
		g2d.drawRect(130, 515, 100, 18);

		g2d.setFont(Resources.f);
		g2d.setColor(Color.BLACK);
		g2d.drawString("Level: " + Integer.toString(lvl), 250, 490);

		g2d.setColor(Color.decode("#0ff801"));
		g2d.drawString("Exp", 250, 520);
		g2d.fillRect(310, 505, (100 / expNeeded) * exp, 18);
		g2d.setColor(Color.BLACK);
		g2d.setFont(Resources.fs);
		g2d.drawString(Integer.toString(exp), 320, 520);
		g2d.drawRect(310, 505, 100, 18);

		g2d.setFont(Resources.f);
		g2d.setColor(Color.BLACK);
		g2d.drawString("Inventory", 550, 480);

		g2d.setColor(Color.BLACK);
		g2d.drawString("Status", 550, 510);

		g2d.setColor(Color.BLACK);
		g2d.drawString("World Map", 550, 540);

	}

	public static Rectangle inventoryRect()
	{
		return new Rectangle(545, 455, 125, 30);
	}

	public static Rectangle mapRect()
	{
		return new Rectangle(547, 515, 125, 30);
	}

}
